1. Field of the Invention
The present invention relates to a method of extracting a road from images, which are photographed from an artificial satellite or aircraft, in order to make a map. More particularly, the present invention relates to a method of extracting a road from photographed images by using template matching of the images.
2. Description of the Related Art
Recently, a map has been made by using images photographed from an artificial satellite or aircraft. That is, the images are first photographed from the artificial satellite or aircraft, distortion of the images is then corrected, and the corrected images are finally used for making the map. By way of such an example, there has been proposed a method of making a map by using the photographed images in Korean Laid-Open Publication No. 2001-25089. The method disclosed in the publication comprises the steps of acquiring images for map-making which are photographed at a first altitude, acquiring images for distortion correction which are photographed at a second altitude higher than the first altitude, correcting distortion of the images for map-making by using the images for distortion correction, and making the map based on corrected images for map-making.
As an example of extracting geographical objects such as roads from the photographed images so as to make the map, there has been proposed so-called a xe2x80x9csnakexe2x80x9d method. The snake method is performed in such a manner that a user marks dotted lines along road contours displayed in the images through his/her manual work and corrects the marked dotted lines in order to extract the road. Therefore, since the conventional methods of extracting the road depend on the manual work of the user, there are problems in that accuracy of the finally mapped road may be deteriorated and more time is required.
The present invention is contemplated to solve the above problems. An object of the present invention is to provide a method of successively extracting a road for map-making from images by using template matching of the images.
In a method of the present invention for achieving the object, when a user selects one point on to a central line of a road as an initial input coordinate, an orientation of the coordinate is calculated. Then, a template and initial target window are generated based on the calculated orientation of the coordinate, and an adaptive least square correlation is performed with the generated template and initial target based on a similarity transformation. Once matching is finished and an optimal target window is obtained, a new initial target is generated by shifting the matched target in the direction of the orientation of the matched target and template matching repeats. As a result, the central lines of the roads corresponding to the initial input coordinates are successively extracted.
Further, there is provided a computer-readable recording medium in which a program is recorded, the program comprising instructions for causing a computer to implement a first step of calculating an orientation of an initial input coordinate after selection thereof; a second step of generating a template window which is inclined by the calculated orientation with respect to the initial input coordinate; a third step of generating an initial target window moved from the generated template window in a direction of the orientation of the input coordinate; a fourth step of calculating an origin point of the initial target window and a new orientation thereof by performing template matching for the generated initial target window; a fifth step of generating a new target window moved from the calculated origin point in a direction of the calculated new orientation and repeatedly performing the fourth step until all the images have been completely processed; and a sixth step of generating the road on a map by connecting the origin points obtained from the images with one another.
According to the present invention, since the road is extracted by user""s input in a simpler manner than a conventional input method and the template matching of the image is used, there is an advantage in that the road can be extracted very accurately within a short time.